/*

 */

import axios from 'axios'

export function getJson(name) {
  return new Promise((resolve, reject) => {
    name = name || 'default';
    let config_url = '/config/' + name + '.json?id=' + Math.random();
    axios.get(config_url).then(result => {
      if (result.status == 200) {
        resolve(result.data)
      }
    }).catch(e => {
      reject(e)
    });
  })
}
